package com.example.controller;

import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.util.SaResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/repo3")
public class RepoController3 {

    @PostMapping("/read")
    @SaCheckPermission("repo:read")
    public SaResult readRepo() {
        return SaResult.ok("可读仓库");
    }

    @PostMapping("/write")
    @SaCheckPermission("repo:write")
    public SaResult writeRepo() {
        return SaResult.ok("可写仓库");
    }

    @PostMapping("/delete")
    @SaCheckPermission("repo:delete")
    public SaResult deleteRepo() {
        return SaResult.ok("可删除仓库");
    }
}
